home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / midas060 / src / vgatext.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-16  |  6.1 KB  |  203 lines

  1. /*      VGATEXT.H
  2.  *
  3.  * VGA text output routines for MIDAS Sound System
  4.  *
  5.  * $Id: vgatext.h,v 1.2 1997/01/16 18:41:59 pekangas Exp $
  6.  *
  7.  * Copyright 1996,1997 Housemarque Inc.
  8.  *
  9.  * This file is part of the MIDAS Sound System, and may only be
  10.  * used, modified and distributed under the terms of the MIDAS
  11.  * Sound System license, LICENSE.TXT. By continuing to use,
  12.  * modify or distribute this file you indicate that you have
  13.  * read the license and understand and accept it fully.
  14. */
  15.  
  16. #ifndef __VGATEXT_H
  17. #define __VGATEXT_H
  18.  
  19.  
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23.  
  24.  
  25. /****************************************************************************\
  26. *
  27. * Function:     void vgaSetWidth(int width);
  28. *
  29. * Description:  Sets the screen width used by text output routines
  30. *
  31. * Input:        int width               screen width in characters
  32. *
  33. \****************************************************************************/
  34.  
  35. void CALLING vgaSetWidth(int width);
  36.  
  37.  
  38.  
  39.  
  40. /****************************************************************************\
  41. *
  42. * Function:     void vgaWriteText(int x, int y, char *txt);
  43. *
  44. * Description:  Writes text on the screen
  45. *
  46. * Input:        int x                   X coordinate of string (up-left
  47. *                                       corner is (1,1))
  48. *               int y                   Y coordinate
  49. *               char *txt               pointer to null-terminated text
  50. *                                       string, which may contain also the
  51. *                                       following special characters:
  52. *                                           \xFF - next char is attribute
  53. *                                           \x7F - next char is RLE count for
  54. *                                               the character following it
  55. *
  56. \****************************************************************************/
  57.  
  58. void CALLING vgaWriteText(int x, int y, char *txt);
  59.  
  60.  
  61.  
  62.  
  63. /****************************************************************************\
  64. *
  65. * Function:     void vgaWriteStr(int x, int y, char *str, char attr,
  66. *               int txtlen);
  67. *
  68. * Description:  Writes a string on the screen
  69. *
  70. * Input:        int x                   X coordinate of the string
  71. *               int y                   Y coordinate
  72. *               char *str               pointer to a ASCIIZ string
  73. *               char attr               attribute for the string
  74. *               int txtlen              number of characters to be printed on
  75. *                                       screen - padded with spaces
  76. *
  77. \****************************************************************************/
  78.  
  79. void CALLING vgaWriteStr(int x, int y, char *str, char attr, int txtlen);
  80.  
  81.  
  82.  
  83. /****************************************************************************\
  84. *
  85. * Function:     void vgaSetMode(int mode)
  86. *
  87. * Description:  Sets a VGA BIOS display mode
  88. *
  89. * Input:        int mode                BIOS mode number
  90. *
  91. \****************************************************************************/
  92.  
  93. void CALLING vgaSetMode(int mode);
  94.  
  95.  
  96.  
  97. /****************************************************************************\
  98. *
  99. * Function:     void vgaWriteByte(int x, int y, uchar byte, char attr);
  100. *
  101. * Description:  Writes a hex byte on the screen
  102. *
  103. * Input:        int x                   X coordinate
  104. *               int y                   Y coordinate
  105. *               uchar byte              byte to be written
  106. *               char attr               attribute for the byte
  107. *
  108. \****************************************************************************/
  109.  
  110. void CALLING vgaWriteByte(int x, int y, uchar byte, char attr);
  111.  
  112.  
  113.  
  114.  
  115. /****************************************************************************\
  116. *
  117. * Function:     void vgaFillRect(int x1, int y1, int x2, int y2, char attr);
  118. *
  119. * Description:  Draws a filled rectangle on the screen
  120. *
  121. * Input:        int x1                  X-coordinate of upper left corner
  122. *               int y1                  Y-coordinate of upper left corner
  123. *               int x2                  X-coordinate of lower left corner
  124. *               int y2                  Y-coordinate of lower left corner
  125. *               char attr               rectangle attribute
  126. *
  127. \****************************************************************************/
  128.  
  129. void CALLING vgaFillRect(int x1, int y1, int x2, int y2, char attr);
  130.  
  131.  
  132.  
  133.  
  134. /****************************************************************************\
  135. *
  136. * Function:     void vgaDrawChar(int x, int y, char ch, char attr);
  137. *
  138. * Description:  Draws a single character on the screen
  139. *
  140. * Input:        int x                   character X-coordinate
  141. *               int y                   character Y-coordinate
  142. *               char ch                 character
  143. *               char attr               character attribute
  144. *
  145. \****************************************************************************/
  146.  
  147. void CALLING vgaDrawChar(int x, int y, char ch, char attr);
  148.  
  149.  
  150.  
  151.  
  152. /****************************************************************************\
  153. *
  154. * Function:     void vgaDrawChars(int x, int y, char ch, char attr, int num);
  155. *
  156. * Description:  Draws many charactersr on the screen
  157. *
  158. * Input:        int x                   character X-coordinate
  159. *               int y                   character Y-coordinate
  160. *               char ch                 character
  161. *               char attr               character attribute
  162. *               int num                 number characters to draw
  163. *
  164. \****************************************************************************/
  165.  
  166. void CALLING vgaDrawChars(int x, int y, char ch, char attr, int num);
  167.  
  168.  
  169.  
  170.  
  171. /****************************************************************************\
  172. *
  173. * Function:     void vgaMoveCursor(int x, int y);
  174. *
  175. * Description:  Moves the text mode cursor to a new location
  176. *
  177. * Input:        int x                   cursor X-coordinate
  178. *               int y                   cursor Y-coordinate
  179. *
  180. \****************************************************************************/
  181.  
  182. void CALLING vgaMoveCursor(int x, int y);
  183.  
  184.  
  185.  
  186.  
  187. #ifdef __cplusplus
  188. }
  189. #endif
  190.  
  191.  
  192. #endif
  193.  
  194.  
  195. /*
  196.  * $Log: vgatext.h,v $
  197.  * Revision 1.2  1997/01/16 18:41:59  pekangas
  198.  * Changed copyright messages to Housemarque
  199.  *
  200.  * Revision 1.1  1996/05/22 20:49:33  pekangas
  201.  * Initial revision
  202.  *
  203. */